#爬取豆瓣评分前100的热门电影

# import requests

# cookies = {
#     'll': '"118172"',
#     'bid': '1g9KuH68SK4',
#     '_pk_id.100001.4cf6': 'b0cd6adabb706ae6.1718802720.',
#     '__yadk_uid': '7Fy28aQx1DCY4NnZHNsGL18fq4eCFizJ',
#     '__utmc': '30149280',
#     '__utmz': '30149280.1718802721.2.2.utmcsr=baidu|utmccn=(organic)|utmcmd=organic',
#     '__utmc': '223695111',
#     '__utmz': '223695111.1718802721.1.1.utmcsr=baidu|utmccn=(organic)|utmcmd=organic',
#     '_vwo_uuid_v2': 'D816E9B77293C40EA8C8478097A9394E6|8963e2d5854837c41641bb0564b6793f',
#     '_pk_ref.100001.4cf6': '%5B%22%22%2C%22%22%2C1718810576%2C%22https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DI5UDdlLzyTcOQNcMLaeu6-ehnN7_hAH4R1JwYjyyLmFkXPGCnNdtD8MKfk52YKMgSTO_ecVUL9Drv0n-aGmR2q%26wd%3D%26eqid%3De79e93560000072c000000046672d91c%22%5D',
#     '_pk_ses.100001.4cf6': '1',
#     'ap_v': '0,6.0',
#     '__utma': '30149280.23331474.1718455367.1718802721.1718810577.3',
#     '__utma': '223695111.1593040718.1718802721.1718802721.1718810577.2',
#     '__utmb': '223695111.0.10.1718810577',
#     '__utmt': '1',
#     '__utmb': '30149280.1.10.1718810577',
# }

# headers = {
#     'accept': '*/*',
#     'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
#     'cache-control': 'no-cache',
#     # 'cookie': 'll="118172"; bid=1g9KuH68SK4; _pk_id.100001.4cf6=b0cd6adabb706ae6.1718802720.; __yadk_uid=7Fy28aQx1DCY4NnZHNsGL18fq4eCFizJ; __utmc=30149280; __utmz=30149280.1718802721.2.2.utmcsr=baidu|utmccn=(organic)|utmcmd=organic; __utmc=223695111; __utmz=223695111.1718802721.1.1.utmcsr=baidu|utmccn=(organic)|utmcmd=organic; _vwo_uuid_v2=D816E9B77293C40EA8C8478097A9394E6|8963e2d5854837c41641bb0564b6793f; _pk_ref.100001.4cf6=%5B%22%22%2C%22%22%2C1718810576%2C%22https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DI5UDdlLzyTcOQNcMLaeu6-ehnN7_hAH4R1JwYjyyLmFkXPGCnNdtD8MKfk52YKMgSTO_ecVUL9Drv0n-aGmR2q%26wd%3D%26eqid%3De79e93560000072c000000046672d91c%22%5D; _pk_ses.100001.4cf6=1; ap_v=0,6.0; __utma=30149280.23331474.1718455367.1718802721.1718810577.3; __utma=223695111.1593040718.1718802721.1718802721.1718810577.2; __utmb=223695111.0.10.1718810577; __utmt=1; __utmb=30149280.1.10.1718810577',
#     'pragma': 'no-cache',
#     'priority': 'u=1, i',
#     'referer': 'https://movie.douban.com/',
#     'sec-ch-ua': '"Google Chrome";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
#     'sec-ch-ua-mobile': '?0',
#     'sec-ch-ua-platform': '"macOS"',
#     'sec-fetch-dest': 'empty',
#     'sec-fetch-mode': 'cors',
#     'sec-fetch-site': 'same-origin',
#     'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36',
#     'x-requested-with': 'XMLHttpRequest',
# }

# params = {
#     'type': 'movie',
#     'tag': '热门',
#     'page_limit': '100',
#     'page_start': '0',
# }

# response = requests.get('https://movie.douban.com/j/search_subjects', params=params, cookies=cookies, headers=headers)


# movie_dict结果数据
# movie_dict = response.json()
# print(movie_dict)




#由于多次爬虫可能会被豆瓣禁用ip，且随时间改变，爬取的结果也会改变，故以下直接给出爬取结果。




#
movie_dict = {
  'subjects': 
  [
    {'episodes_info': '',
    'rate': '8.5',
    'cover_x': 4000,
    'title': '排球少年！！垃圾场决战',
    'url': 'https://movie.douban.com/subject/36060209/',
    'playable': False,
    'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2909378407.jpg',
    'id': '36060209',
    'cover_y': 5648,
    'is_new': False
    }, 
    {'episodes_info': '', 'rate': '7.3', 'cover_x': 2000, 'title': '失落的婴儿', 'url': 'https://movie.douban.com/subject/36492052/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2906803778.jpg', 'id': '36492052', 'cover_y': 3000, 'is_new': True}, {'episodes_info': '', 'rate': '6.3', 'cover_x': 2026, 'title': '神秘友友', 'url': 'https://movie.douban.com/subject/34858077/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2908463746.jpg', 'id': '34858077', 'cover_y': 3000, 'is_new': True}, {'episodes_info': '', 'rate': '7.0', 'cover_x': 1013, 'title': '职业杀手', 'url': 'https://movie.douban.com/subject/35898983/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2908994553.jpg', 'id': '35898983', 'cover_y': 1500, 'is_new': False}, {'episodes_info': '', 'rate': '6.5', 'cover_x': 8268, 'title': '美国内战', 'url': 'https://movie.douban.com/subject/35750081/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2908735043.jpg', 'id': '35750081', 'cover_y': 11811, 'is_new': False}, {'episodes_info': '', 'rate': '5.6', 'cover_x': 3000, 'title': '末路狂花钱', 'url': 'https://movie.douban.com/subject/36430322/', 'playable': True, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2906646351.jpg', 'id': '36430322', 'cover_y': 4184, 'is_new': False}, {'episodes_info': '', 'rate': '8.0', 'cover_x': 1279, 'title': '我们一起摇太阳', 'url': 'https://movie.douban.com/subject/36149032/', 'playable': True, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2904467472.jpg', 'id': '36149032', 'cover_y': 1791, 'is_new': False}, {'episodes_info': '', 'rate': '8.5', 'cover_x': 1448, 'title': '窗边的小豆豆', 'url': 'https://movie.douban.com/subject/36319595/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2899309776.jpg', 'id': '36319595', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '6.1', 'cover_x': 4000, 'title': '草木人间', 'url': 'https://movie.douban.com/subject/35240117/', 'playable': True, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2905611921.jpg', 'id': '35240117', 'cover_y': 6000, 'is_new': False}, {'episodes_info': '', 'rate': '6.8', 'cover_x': 2602, 'title': '特技狂人', 'url': 'https://movie.douban.com/subject/35268614/', 'playable': False, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2907907131.jpg', 'id': '35268614', 'cover_y': 4000, 'is_new': False}, {'episodes_info': '', 'rate': '7.1', 'cover_x': 2048, 'title': '盟军敢死队', 'url': 'https://movie.douban.com/subject/34971728/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2908456064.jpg', 'id': '34971728', 'cover_y': 2861, 'is_new': False}, {'episodes_info': '', 'rate': '6.5', 'cover_x': 2194, 'title': '母亲的直觉', 'url': 'https://movie.douban.com/subject/35238024/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2908454232.jpg', 'id': '35238024', 'cover_y': 3125, 'is_new': False}, {'episodes_info': '', 'rate': '5.7', 'cover_x': 2025, 'title': '巴黎深渊', 'url': 'https://movie.douban.com/subject/36404268/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2908554182.jpg', 'id': '36404268', 'cover_y': 3000, 'is_new': True}, {'episodes_info': '', 'rate': '7.0', 'cover_x': 2000, 'title': '野兽', 'url': 'https://movie.douban.com/subject/35335895/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2909040642.jpg', 'id': '35335895', 'cover_y': 3000, 'is_new': False}, {'episodes_info': '', 'rate': '6.7', 'cover_x': 2897, 'title': '机动战士高达SEED FREEDOM', 'url': 'https://movie.douban.com/subject/34822168/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2900882420.jpg', 'id': '34822168', 'cover_y': 4096, 'is_new': False}, {'episodes_info': '', 'rate': '8.1', 'cover_x': 980, 'title': '老狐狸', 'url': 'https://movie.douban.com/subject/35611467/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2898513142.jpg', 'id': '35611467', 'cover_y': 1400, 'is_new': False}, {'episodes_info': '', 'rate': '8.3', 'cover_x': 2898, 'title': '去唱卡拉OK吧！', 'url': 'https://movie.douban.com/subject/35863319/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2900802556.jpg', 'id': '35863319', 'cover_y': 4096, 'is_new': False}, {'episodes_info': '', 'rate': '6.5', 'cover_x': 2025, 'title': '凶兆前传', 'url': 'https://movie.douban.com/subject/26783008/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2906145184.jpg', 'id': '26783008', 'cover_y': 3000, 'is_new': False}, {'episodes_info': '', 'rate': '6.7', 'cover_x': 9355, 'title': '哆啦A梦：大雄的地球交响乐', 'url': 'https://movie.douban.com/subject/36440325/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2906817350.jpg', 'id': '36440325', 'cover_y': 13266, 'is_new': False}, {'episodes_info': '', 'rate': '7.6', 'cover_x': 5757, 'title': '北极百货店的接待员', 'url': 'https://movie.douban.com/subject/36381756/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2898856563.jpg', 'id': '36381756', 'cover_y': 8141, 'is_new': False}, {'episodes_info': '', 'rate': '6.7', 'cover_x': 1400, 'title': '破墓', 'url': 'https://movie.douban.com/subject/35490167/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2905896429.jpg', 'id': '35490167', 'cover_y': 2000, 'is_new': False}, {'episodes_info': '', 'rate': '6.5', 'cover_x': 2765, 'title': '挑战者', 'url': 'https://movie.douban.com/subject/35742980/', 'playable': True, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2902765793.jpg', 'id': '35742980', 'cover_y': 4096, 'is_new': False}, {'episodes_info': '', 'rate': '5.9', 'cover_x': 1944, 'title': '对你的想象', 'url': 'https://movie.douban.com/subject/35503073/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2905327559.jpg', 'id': '35503073', 'cover_y': 2880, 'is_new': False}, {'episodes_info': '', 'rate': '8.1', 'cover_x': 5760, 'title': '周处除三害', 'url': 'https://movie.douban.com/subject/36151692/', 'playable': True, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2905021483.jpg', 'id': '36151692', 'cover_y': 8640, 'is_new': False}, {'episodes_info': '', 'rate': '8.0', 'cover_x': 2892, 'title': '黎明的一切', 'url': 'https://movie.douban.com/subject/36135198/', 'playable': False, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2903380481.jpg', 'id': '36135198', 'cover_y': 4096, 'is_new': False}, {'episodes_info': '', 'rate': '7.1', 'cover_x': 1474, 'title': '邪恶不存在', 'url': 'https://movie.douban.com/subject/36490368/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2897899393.jpg', 'id': '36490368', 'cover_y': 2078, 'is_new': False}, {'episodes_info': '', 'rate': '5.9', 'cover_x': 1786, 'title': '还是觉得你最好2', 'url': 'https://movie.douban.com/subject/36530235/', 'playable': True, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2904625136.jpg', 'id': '36530235', 'cover_y': 2500, 'is_new': False}, {'episodes_info': '', 'rate': '8.9', 'cover_x': 2000, 'title': '姥姥的外孙', 'url': 'https://movie.douban.com/subject/36328210/', 'playable': False, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2907094321.jpg', 'id': '36328210', 'cover_y': 2853, 'is_new': False}, {'episodes_info': '', 'rate': '6.5', 'cover_x': 1536, 'title': '哥斯拉-1.0', 'url': 'https://movie.douban.com/subject/35914398/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2900227040.jpg', 'id': '35914398', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '5.9', 'cover_x': 450, 'title': '异星战境', 'url': 'https://movie.douban.com/subject/35693524/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2907314274.jpg', 'id': '35693524', 'cover_y': 630, 'is_new': False}, {'episodes_info': '', 'rate': '8.8', 'cover_x': 1500, 'title': '首尔之春', 'url': 'https://movie.douban.com/subject/35712804/', 'playable': False, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2900335741.jpg', 'id': '35712804', 'cover_y': 2150, 'is_new': False}, {'episodes_info': '', 'rate': '7.6', 'cover_x': 10115, 'title': '你想活出怎样的人生', 'url': 'https://movie.douban.com/subject/26925611/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2906527755.jpg', 'id': '26925611', 'cover_y': 14277, 'is_new': False}, {'episodes_info': '', 'rate': '8.0', 'cover_x': 1434, 'title': '绝密配方', 'url': 'https://movie.douban.com/subject/35950503/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2895705666.jpg', 'id': '35950503', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '8.3', 'cover_x': 4134, 'title': '杂种', 'url': 'https://movie.douban.com/subject/35699773/', 'playable': False, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2900726031.jpg', 'id': '35699773', 'cover_y': 5906, 'is_new': False}, {'episodes_info': '', 'rate': '8.1', 'cover_x': 1600, 'title': '狗神', 'url': 'https://movie.douban.com/subject/35736202/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2901534046.jpg', 'id': '35736202', 'cover_y': 2285, 'is_new': False}, {'episodes_info': '', 'rate': '7.5', 'cover_x': 1600, 'title': '第二十条', 'url': 'https://movie.douban.com/subject/36208094/', 'playable': True, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2903145026.jpg', 'id': '36208094', 'cover_y': 2666, 'is_new': False}, {'episodes_info': '', 'rate': '6.7', 'cover_x': 1350, 'title': '荧屏在发光', 'url': 'https://movie.douban.com/subject/35700145/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2905033896.jpg', 'id': '35700145', 'cover_y': 2000, 'is_new': True}, {'episodes_info': '', 'rate': '6.3', 'cover_x': 2500, 'title': '猩球崛起：新世界', 'url': 'https://movie.douban.com/subject/36069854/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2905957300.jpg', 'id': '36069854', 'cover_y': 3703, 'is_new': False}, {'episodes_info': '', 'rate': '6.5', 'cover_x': 1666, 'title': '银河写手', 'url': 'https://movie.douban.com/subject/36467351/', 'playable': True, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2905680871.jpg', 'id': '36467351', 'cover_y': 2500, 'is_new': False}, {'episodes_info': '', 'rate': '7.2', 'cover_x': 900, 'title': '犯罪都市4', 'url': 'https://movie.douban.com/subject/36085987/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2906121487.jpg', 'id': '36085987', 'cover_y': 1287, 'is_new': False}, {'episodes_info': '', 'rate': '5.0', 'cover_x': 3757, 'title': '没有一顿火锅解决不了的事', 'url': 'https://movie.douban.com/subject/36207371/', 'playable': True, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2907202358.jpg', 'id': '36207371', 'cover_y': 6000, 'is_new': False}, {'episodes_info': '', 'rate': '7.3', 'cover_x': 3072, 'title': '达达达达达利！', 'url': 'https://movie.douban.com/subject/36151170/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2902258804.jpg', 'id': '36151170', 'cover_y': 4096, 'is_new': False}, {'episodes_info': '', 'rate': '8.2', 'cover_x': 2764, 'title': '沙丘2', 'url': 'https://movie.douban.com/subject/35575567/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2902227445.jpg', 'id': '35575567', 'cover_y': 4096, 'is_new': False}, {'episodes_info': '', 'rate': '8.9', 'cover_x': 1433, 'title': '还有明天', 'url': 'https://movie.douban.com/subject/36445098/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2906163989.jpg', 'id': '36445098', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '7.7', 'cover_x': 1080, 'title': '美国小说', 'url': 'https://movie.douban.com/subject/36212631/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2902166424.jpg', 'id': '36212631', 'cover_y': 1600, 'is_new': False}, {'episodes_info': '', 'rate': '6.4', 'cover_x': 1441, 'title': '恶女', 'url': 'https://movie.douban.com/subject/36151614/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2897435928.jpg', 'id': '36151614', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '6.7', 'cover_x': 1435, 'title': '小晓', 'url': 'https://movie.douban.com/subject/35942301/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2898906860.jpg', 'id': '35942301', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '7.0', 'cover_x': 2400, 'title': '可怜的东西', 'url': 'https://movie.douban.com/subject/35350109/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2897662939.jpg', 'id': '35350109', 'cover_y': 3555, 'is_new': False}, {'episodes_info': '', 'rate': '7.6', 'cover_x': 2600, 'title': '飞驰人生2', 'url': 'https://movie.douban.com/subject/36369452/', 'playable': True, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2903066285.jpg', 'id': '36369452', 'cover_y': 3900, 'is_new': False}, {'episodes_info': '', 'rate': '8.4', 'cover_x': 1500, 'title': '奈德', 'url': 'https://movie.douban.com/subject/35385225/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2901077639.jpg', 'id': '35385225', 'cover_y': 2222, 'is_new': False}, {'episodes_info': '', 'rate': '7.7', 'cover_x': 1254, 'title': '热辣滚烫', 'url': 'https://movie.douban.com/subject/36081094/', 'playable': True, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2904304396.jpg', 'id': '36081094', 'cover_y': 1746, 'is_new': False}, {'episodes_info': '', 'rate': '6.6', 'cover_x': 2764, 'title': '哥斯拉大战金刚2：帝国崛起', 'url': 'https://movie.douban.com/subject/35453251/', 'playable': False, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2904477111.jpg', 'id': '35453251', 'cover_y': 4096, 'is_new': False}, {'episodes_info': '', 'rate': '7.7', 'cover_x': 1382, 'title': '小小恶信件', 'url': 'https://movie.douban.com/subject/35900773/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2902162282.jpg', 'id': '35900773', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '7.4', 'cover_x': 2215, 'title': '错过你的那些年', 'url': 'https://movie.douban.com/subject/36245685/', 'playable': False, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2907242201.jpg', 'id': '36245685', 'cover_y': 3100, 'is_new': False}, {'episodes_info': '', 'rate': '6.3', 'cover_x': 848, 'title': 'Kyrie之歌', 'url': 'https://movie.douban.com/subject/35925066/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2895511438.jpg', 'id': '35925066', 'cover_y': 1200, 'is_new': False}, {'episodes_info': '', 'rate': '7.4', 'cover_x': 4804, 'title': '间谍过家家 代号：白', 'url': 'https://movie.douban.com/subject/36190889/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2907078869.jpg', 'id': '36190889', 'cover_y': 6800, 'is_new': False}, {'episodes_info': '', 'rate': '6.2', 'cover_x': 1350, 'title': '灭世男孩', 'url': 'https://movie.douban.com/subject/35730909/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2905824570.jpg', 'id': '35730909', 'cover_y': 2000, 'is_new': False}, {'episodes_info': '', 'rate': '7.2', 'cover_x': 1172, 'title': '旅行者的需求', 'url': 'https://movie.douban.com/subject/36464506/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2903628386.jpg', 'id': '36464506', 'cover_y': 1656, 'is_new': False}, {'episodes_info': '', 'rate': '6.3', 'cover_x': 6800, 'title': '功夫熊猫4', 'url': 'https://movie.douban.com/subject/26715496/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2903578097.jpg', 'id': '26715496', 'cover_y': 10771, 'is_new': False}, {'episodes_info': '', 'rate': '8.8', 'cover_x': 3000, 'title': '奥本海默', 'url': 'https://movie.douban.com/subject/35593344/', 'playable': True, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2897212051.jpg', 'id': '35593344', 'cover_y': 4445, 'is_new': False}, {'episodes_info': '', 'rate': '6.1', 'cover_x': 2000, 'title': '噬血芭蕾', 'url': 'https://movie.douban.com/subject/35410336/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2907891933.jpg', 'id': '35410336', 'cover_y': 3000, 'is_new': False}, {'episodes_info': '', 'rate': '6.6', 'cover_x': 2835, 'title': '天降幸运', 'url': 'https://movie.douban.com/subject/35603796/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2900521478.jpg', 'id': '35603796', 'cover_y': 3850, 'is_new': False}, {'episodes_info': '', 'rate': '6.7', 'cover_x': 2000, 'title': '惊魂加油站', 'url': 'https://movie.douban.com/subject/36160576/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2906620290.jpg', 'id': '36160576', 'cover_y': 3000, 'is_new': False}, {'episodes_info': '', 'rate': '7.4', 'cover_x': 3000, 'title': '旺卡', 'url': 'https://movie.douban.com/subject/26897888/', 'playable': True, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2901229830.jpg', 'id': '26897888', 'cover_y': 4442, 'is_new': False}, {'episodes_info': '', 'rate': '7.8', 'cover_x': 2025, 'title': '留校联盟', 'url': 'https://movie.douban.com/subject/35496212/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2902526533.jpg', 'id': '35496212', 'cover_y': 3000, 'is_new': False}, {'episodes_info': '', 'rate': '5.8', 'cover_x': 2081, 'title': '黄雀在后！', 'url': 'https://movie.douban.com/subject/30359440/', 'playable': True, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2905336155.jpg', 'id': '30359440', 'cover_y': 2953, 'is_new': False}, {'episodes_info': '', 'rate': '8.0', 'cover_x': 3000, 'title': '芭比', 'url': 'https://movie.douban.com/subject/4058939/', 'playable': True, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2895679456.jpg', 'id': '4058939', 'cover_y': 4376, 'is_new': False}, {'episodes_info': '', 'rate': '8.3', 'cover_x': 1024, 'title': '郊游', 'url': 'https://movie.douban.com/subject/36369460/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2903686353.jpg', 'id': '36369460', 'cover_y': 1466, 'is_new': False}, {'episodes_info': '', 'rate': '6.1', 'cover_x': 2100, 'title': '金手指', 'url': 'https://movie.douban.com/subject/35074609/', 'playable': True, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2901830629.jpg', 'id': '35074609', 'cover_y': 3000, 'is_new': False}, {'episodes_info': '', 'rate': '5.9', 'cover_x': 8100, 'title': '血爱成河', 'url': 'https://movie.douban.com/subject/35801408/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2902183869.jpg', 'id': '35801408', 'cover_y': 12000, 'is_new': False}, {'episodes_info': '', 'rate': '7.7', 'cover_x': 1433, 'title': '不要太期待世界末日', 'url': 'https://movie.douban.com/subject/35772577/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2902389739.jpg', 'id': '35772577', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '6.3', 'cover_x': 1548, 'title': '正欲', 'url': 'https://movie.douban.com/subject/36093500/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2898262635.jpg', 'id': '36093500', 'cover_y': 2190, 'is_new': False}, {'episodes_info': '', 'rate': '7.2', 'cover_x': 2700, 'title': '厨房', 'url': 'https://movie.douban.com/subject/35881314/', 'playable': False, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2904257621.jpg', 'id': '35881314', 'cover_y': 4000, 'is_new': False}, {'episodes_info': '', 'rate': '6.9', 'cover_x': 1434, 'title': '同名同姓', 'url': 'https://movie.douban.com/subject/36650787/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2900995954.jpg', 'id': '36650787', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '7.6', 'cover_x': 5009, 'title': '三大队', 'url': 'https://movie.douban.com/subject/35208463/', 'playable': True, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2901703469.jpg', 'id': '35208463', 'cover_y': 8000, 'is_new': False}, {'episodes_info': '', 'rate': '6.5', 'cover_x': 800, 'title': '怨望', 'url': 'https://movie.douban.com/subject/36471609/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2907121980.jpg', 'id': '36471609', 'cover_y': 1188, 'is_new': True}, {'episodes_info': '', 'rate': '5.9', 'cover_x': 1000, 'title': '前途海量', 'url': 'https://movie.douban.com/subject/36572608/', 'playable': True, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2908010436.jpg', 'id': '36572608', 'cover_y': 1778, 'is_new': False}, {'episodes_info': '', 'rate': '8.3', 'cover_x': 2600, 'title': '长安三万里', 'url': 'https://movie.douban.com/subject/36035676/', 'playable': True, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2893820209.jpg', 'id': '36035676', 'cover_y': 4153, 'is_new': False}, {'episodes_info': '', 'rate': '7.1', 'cover_x': 1673, 'title': '佩佩', 'url': 'https://movie.douban.com/subject/35318019/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2904180933.jpg', 'id': '35318019', 'cover_y': 2382, 'is_new': False}, {'episodes_info': '', 'rate': '7.2', 'cover_x': 2300, 'title': '涉过愤怒的海', 'url': 'https://movie.douban.com/subject/33456512/', 'playable': True, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2900852349.jpg', 'id': '33456512', 'cover_y': 3673, 'is_new': False}, {'episodes_info': '', 'rate': '6.6', 'cover_x': 1500, 'title': '杀手', 'url': 'https://movie.douban.com/subject/2998451/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2897454450.jpg', 'id': '2998451', 'cover_y': 2222, 'is_new': False}, {'episodes_info': '', 'rate': '6.4', 'cover_x': 3938, 'title': '朝云暮雨', 'url': 'https://movie.douban.com/subject/35359715/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2908249257.jpg', 'id': '35359715', 'cover_y': 5907, 'is_new': False}, {'episodes_info': '', 'rate': '6.5', 'cover_x': 1440, 'title': '绝对杀手', 'url': 'https://movie.douban.com/subject/35904240/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2898929059.jpg', 'id': '35904240', 'cover_y': 2160, 'is_new': False}, {'episodes_info': '', 'rate': '6.2', 'cover_x': 1279, 'title': '海王2：失落的王国', 'url': 'https://movie.douban.com/subject/30444942/', 'playable': True, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2900515564.jpg', 'id': '30444942', 'cover_y': 1895, 'is_new': False}, {'episodes_info': '', 'rate': '7.2', 'cover_x': 2000, 'title': '冠军亚瑟', 'url': 'https://movie.douban.com/subject/34768157/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2904880159.jpg', 'id': '34768157', 'cover_y': 3000, 'is_new': False}, {'episodes_info': '', 'rate': '8.2', 'cover_x': 590, 'title': '12年级的失败', 'url': 'https://movie.douban.com/subject/36629878/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2900433324.jpg', 'id': '36629878', 'cover_y': 888, 'is_new': False}, {'episodes_info': '', 'rate': '7.6', 'cover_x': 1382, 'title': '星条红与皇室蓝', 'url': 'https://movie.douban.com/subject/33406097/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2896539228.jpg', 'id': '33406097', 'cover_y': 2048, 'is_new': False}, {'episodes_info': '', 'rate': '7.8', 'cover_x': 1148, 'title': '迷途新娘', 'url': 'https://movie.douban.com/subject/36109523/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2901122794.jpg', 'id': '36109523', 'cover_y': 1530, 'is_new': False}, {'episodes_info': '', 'rate': '6.9', 'cover_x': 5906, 'title': '熊出没·逆转时空', 'url': 'https://movie.douban.com/subject/36438166/', 'playable': True, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2902482452.jpg', 'id': '36438166', 'cover_y': 8505, 'is_new': False}, {'episodes_info': '', 'rate': '7.9', 'cover_x': 1920, 'title': '孤身二人', 'url': 'https://movie.douban.com/subject/35679700/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2907029603.jpg', 'id': '35679700', 'cover_y': 2560, 'is_new': True}, {'episodes_info': '', 'rate': '7.5', 'cover_x': 8766, 'title': '蜡笔小新：新次元！超能力大决战', 'url': 'https://movie.douban.com/subject/36188869/', 'playable': True, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2899530660.jpg', 'id': '36188869', 'cover_y': 12402, 'is_new': False}, {'episodes_info': '', 'rate': '7.0', 'cover_x': 1153, 'title': '弗洛伊德的最后一会', 'url': 'https://movie.douban.com/subject/35909367/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2908507279.jpg', 'id': '35909367', 'cover_y': 1733, 'is_new': False}, {'episodes_info': '', 'rate': '6.0', 'cover_x': 4370, 'title': '灿烂的她', 'url': 'https://movie.douban.com/subject/35633969/', 'playable': True, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2905379453.jpg', 'id': '35633969', 'cover_y': 6201, 'is_new': False}, {'episodes_info': '', 'rate': '6.7', 'cover_x': 1944, 'title': '萨特本', 'url': 'https://movie.douban.com/subject/35749948/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2900961069.jpg', 'id': '35749948', 'cover_y': 2880, 'is_new': False}, {'episodes_info': '', 'rate': '6.1', 'cover_x': 1483, 'title': '红色罪恶', 'url': 'https://movie.douban.com/subject/36537772/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2908792403.jpg', 'id': '36537772', 'cover_y': 2222, 'is_new': True}, {'episodes_info': '', 'rate': '5.7', 'cover_x': 2763, 'title': '只想爱你', 'url': 'https://movie.douban.com/subject/36245733/', 'playable': False, 'cover': 'https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2899604306.jpg', 'id': '36245733', 'cover_y': 4096, 'is_new': False}, {'episodes_info': '', 'rate': '7.5', 'cover_x': 1892, 'title': '都是陌生人', 'url': 'https://movie.douban.com/subject/35955811/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2898667490.jpg', 'id': '35955811', 'cover_y': 2837, 'is_new': False}, {'episodes_info': '', 'rate': '7.1', 'cover_x': 1280, 'title': '傻钱', 'url': 'https://movie.douban.com/subject/36082226/', 'playable': False, 'cover': 'https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2896514337.jpg', 'id': '36082226', 'cover_y': 1920, 'is_new': False}, {'episodes_info': '', 'rate': '5.6', 'cover_x': 2765, 'title': '无瑕修女', 'url': 'https://movie.douban.com/subject/36140071/', 'playable': False, 'cover': 'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2903683600.jpg', 'id': '36140071', 'cover_y': 4096, 'is_new': False}, {'episodes_info': '', 'rate': '7.3', 'cover_x': 2740, 'title': '过季', 'url': 'https://movie.douban.com/subject/36219480/', 'playable': False, 'cover': 'https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2903057701.jpg', 'id': '36219480', 'cover_y': 3732, 'is_new': False}]}

#接下来对爬取的字典进行操作

cover_img_name_list=[] #初始化一个列表
for number in range(0,100):
    movie=movie_dict['subjects'][number]['cover']  #遍历列表的cover
    movie=movie.split("/")[-1]  #提取出背景图的图片文件名称
    cover_img_name_list.append(movie)  #将图片名存入列表
cover_img_name_list=set(cover_img_name_list)  #去重
cover_img_name_list=list(cover_img_name_list)
print(cover_img_name_list)

new_list=[]  #初始化一个列表
new_dict={}  #初始化一个字典
for the_number in range(0,100):
    if  movie_dict['subjects'][the_number]['is_new']==False and float(movie_dict['subjects'][the_number]['rate'])>=8 or movie_dict['subjects'][the_number]['is_new']==True or len(movie_dict['subjects'][the_number]['title'])<=4:  #用if筛选满足条件的电影
        new_list.append(movie_dict['subjects'][the_number])  #将满足条件的电影存入列表
for index,value in enumerate(new_list):  #遍历列表的下标
    new_dict[new_list[index]['id']]=new_list[index]  #将电影id作为key 将其余信息组成value
    new_dict[new_list[index]['id']].pop('id')
movie_dict['subjects']=new_dict    #将列表转为字典
print(movie_dict)

        
        